.class public Lcom/glympse/platform/common/ServerPost$PostTimer;
.super Lcom/glympse/platform/GRunnable;
.source "ServerPost.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/platform/common/ServerPost;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x4
    name = "PostTimer"
.end annotation


# instance fields
.field final synthetic this$0:Lcom/glympse/platform/common/ServerPost;


# direct methods
.method protected constructor <init>(Lcom/glympse/platform/common/ServerPost;)V
    .locals 0
    .parameter

    .prologue
    .line 1397
    iput-object p1, p0, Lcom/glympse/platform/common/ServerPost$PostTimer;->this$0:Lcom/glympse/platform/common/ServerPost;

    invoke-direct {p0}, Lcom/glympse/platform/GRunnable;-><init>()V

    return-void
.end method


# virtual methods
.method public Run()V
    .locals 1

    .prologue
    .line 1420
    iget-object v0, p0, Lcom/glympse/platform/common/ServerPost$PostTimer;->this$0:Lcom/glympse/platform/common/ServerPost;

    invoke-virtual {v0}, Lcom/glympse/platform/common/ServerPost;->DoPost()V

    .line 1421
    return-void
.end method

.method public Start()Z
    .locals 3

    .prologue
    .line 1402
    invoke-virtual {p0}, Lcom/glympse/platform/common/ServerPost$PostTimer;->Stop()V

    .line 1403
    iget-object v0, p0, Lcom/glympse/platform/common/ServerPost$PostTimer;->this$0:Lcom/glympse/platform/common/ServerPost;

    invoke-virtual {v0}, Lcom/glympse/platform/common/ServerPost;->ComputePostRate()V

    .line 1404
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "POST RATE: "

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/glympse/platform/common/ServerPost$PostTimer;->this$0:Lcom/glympse/platform/common/ServerPost;

    iget v1, v1, Lcom/glympse/platform/common/ServerPost;->m_nPostTimeInterval:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 1405
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    iget-object v1, p0, Lcom/glympse/platform/common/ServerPost$PostTimer;->this$0:Lcom/glympse/platform/common/ServerPost;

    iget v1, v1, Lcom/glympse/platform/common/ServerPost;->m_nPostTimeInterval:I

    int-to-long v1, v1

    invoke-virtual {v0, p0, v1, v2}, Lcom/glympse/platform/Platform;->PostToMainThreadDelayed(Lcom/glympse/platform/GRunnable;J)Z

    move-result v0

    goto :goto_0
.end method

.method public Stop()V
    .locals 1

    .prologue
    .line 1411
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 1413
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/glympse/platform/Platform;->CancelPost(Lcom/glympse/platform/GRunnable;)V

    .line 1415
    :cond_0
    return-void
.end method
